﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Test.aspx.vb" Inherits="Test" %>

<%@ Register Src="../UserCuntrols/CustomDropDownJSON.ascx" TagName="CustomDropDown"
    TagPrefix="uc1" %>
<%@ Register Src="~/UserCuntrols/footer.ascx" TagName="footer" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Search</title>
    <link href="../App_Themes/myTheme/myTheme.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
    document.Services = "GigitiService.asmx";
    document.SearchTab = 1;
//    document.IsKeyWordChanged = false;
    document.WebKeyword = "";
    document.ImageKeyword = "";
    document.VideoKeyword = "";
    document.NewsKeyword = "";
    document.IsSearched = false;
    function removeXML(oXml){
        try{
            return (oXml.responseXML.firstChild.textContent)?oXml.responseXML.firstChild.textContent:oXml.responseXML.lastChild.text;
        }
        catch(e){
            return oXml.responseText ;
            //return 'No record found';
        }
    }
   
    Search = function(){
        if($('txtKeyward').value != ""){
    //        document.IsKeyWordChanged = true;
            document.IsSearched = true;
            switch(document.SearchTab){
                case 1:
                    if(document.WebKeyword != $("txtKeyward").value){
                        if($("DropValue").value != ""){
                            YahooWebsearch(1);
                            TopTenRank($("DropValue").value);
                        }
                        else{
                            YahooWebsearch(3);
                            TopTenYahooSearch();
                        }
                        EbayWebsearch(1);
                        document.WebKeyword = $("txtKeyward").value;
                    }
                    break;
                case 2:
                    if(document.ImageKeyword != $("txtKeyward").value){
                        YahooImageSearch(1);
                        document.ImageKeyword = $("txtKeyward").value;
                    }
                    break;
                case 3:
                    document.location.href = "";
                    break;
                case 4:
                    if(document.VideoKeyword != $("txtKeyward").value){
                        YahooVideoSearch(1);
                        document.VideoKeyword = $("txtKeyward").value;
                    }
                    break;
                case 5:
                    if( document.NewsKeyword != $("txtKeyward").value){
                        YahooNewsSearch(1);
                        document.NewsKeyword = $("txtKeyward").value;
                    }
                    break;
                default:
                    if(document.WebKeyword != $("txtKeyward").value){
                        if($("DropValue").value != ""){
                            YahooWebsearch(1);
                            TopTenRank($("DropValue").value);
                        }
                        else{
                            YahooWebsearch(3);
                            TopTenYahooSearch();
                        }
                        EbayWebsearch(1);
                        document.WebKeyword = $("txtKeyward").value;
                    }
                    break;
            }
            
            $('d_SearchOptionPlace').style.marginTop = "100px";
            $('footerdiv2').style.display = "none";
            $('footerdiv1').style.display = "";
            $('background').style.display = "none";
        }
        OpenTabSearch(document.SearchTab);
    };     
         
    YahooWebsearch = function(PageIndex){
            $('loaderyahoo').style.display = "";
	        oParam = 'KeyWard='+$('txtKeyward').value+'&PageIndex='+PageIndex;
    	    
            new Ajax.Request(document.Services+'/YahooWebsearch',{
                    method: 'post',
                    parameters: oParam, 
                    onComplete: _YahooWebsearch
                }
            );
    };
    _YahooWebsearch = function(Result){
        $('YahooWebsearchResult').innerHTML = removeXML(Result);
        $('loaderyahoo').style.display = "none";
        //if(document.IsKeyWordChanged){
        //    document.IsKeyWordChanged = false;
            //YahooImageSearch(1);
            //YahooVideoSearch(1);
            //YahooNewsSearch(1);
        //}
    };

    EbayWebsearch = function(PageIndex){
            $('loaderebay').style.display = "";
	        oParam = 'KeyWard='+$('txtKeyward').value+'&PageIndex='+PageIndex;
    	    
            new Ajax.Request(document.Services+'/EbayWebsearch',{
                    method: 'post',
                    parameters: oParam, 
                    onComplete: _EbayWebsearch
                }
            );
    };
    _EbayWebsearch = function(Result){
        $('EbayWebsearchResult').innerHTML = removeXML(Result);
        $('loaderebay').style.display = "none";
    };

    TopTenYahooSearch = function(){
            $('loadertopten').style.display = "";
	        oParam = 'KeyWard='+$('txtKeyward').value;
    	    
            new Ajax.Request(document.Services+'/YahooWebsearchTopTen',{
                    method: 'post',
                    parameters: oParam, 
                    onComplete: _TopTenYahooSearch
                }
            );
    };
    _TopTenYahooSearch  = function(Result){
        $('TopTenResult').innerHTML = removeXML(Result);
        $('loadertopten').style.display = "none";
    };

    TopTenRank = function(SubCategory){
        $('loadertopten').style.display = "";
        
        oParam = 'SubCategory='+SubCategory
    	    
            new Ajax.Request(document.Services+'/TopTenRank',{
                    method: 'post',
                    parameters: oParam, 
                    onComplete: _TopTenRank
                }
            );

    };
    _TopTenRank = function(Result){
        $('TopTenResult').innerHTML = removeXML(Result);
        $('loadertopten').style.display = "none";
    };
    AddComments = function(WebsiteName){
        $('loadertopten').style.display = "";
        
        oParam = 'WebsiteName='+WebsiteName
    	    
            new Ajax.Request(document.Services+'/ViewComments',{
                    method: 'post',
                    parameters: oParam, 
                    onComplete: _AddComments
                }
            );
    };
    _AddComments = function(Result){
        $('TopTenResult').innerHTML = removeXML(Result);
        $('loadertopten').style.display = "none";
    }
    YahooImageSearch = function(PageIndex){
        //$('loaderyahoo').style.display = "";
        oParam = 'KeyWard='+$('txtKeyward').value+'&PageIndex='+PageIndex;
	    
        new Ajax.Request(document.Services+'/YahooImageSearch',{
                method: 'post',
                parameters: oParam, 
                onComplete: _YahooImageSearch
            }
        );
    };
    _YahooImageSearch = function(Result){
        $('d_ImageSearchResult').innerHTML = removeXML(Result);
        //$('loaderyahoo').style.display = "none";
        //if(document.IsKeyWordChanged){
        //    document.IsKeyWordChanged = false;
            //YahooVideoSearch(1);
            //YahooNewsSearch(1);
            //YahooWebsearch(3);
            //TopTenYahooSearch();
            //EbayWebsearch(1);
        //}
    };
    YahooVideoSearch = function(PageIndex){
        //$('loaderyahoo').style.display = "";
        oParam = 'KeyWard='+$('txtKeyward').value+'&PageIndex='+PageIndex;
	    
        new Ajax.Request(document.Services+'/YahooVideoSearch',{
                method: 'post',
                parameters: oParam, 
                onComplete: _YahooVideoSearch
            }
        );
    };
    _YahooVideoSearch = function(Result){
        $('d_VideoSearchResult').innerHTML = removeXML(Result);
        //$('loaderyahoo').style.display = "none";
        //if(document.IsKeyWordChanged){
        //    document.IsKeyWordChanged = false;
            //YahooImageSearch(1);
            //YahooNewsSearch(1);
            //YahooWebsearch(3);
            //TopTenYahooSearch();
            //EbayWebsearch(1);
        //}
    };
    YahooNewsSearch = function(PageIndex){
        //$('loaderyahoo').style.display = "";
        oParam = 'KeyWard='+$('txtKeyward').value+'&PageIndex='+PageIndex;
	    
        new Ajax.Request(document.Services+'/YahooNewsSearch',{
                method: 'post',
                parameters: oParam, 
                onComplete: _YahooNewsSearch
            }
        );
    };
    _YahooNewsSearch = function(Result){
        $('d_NewsSearchResult').innerHTML = removeXML(Result);
        //$('loaderyahoo').style.display = "none";
        //if(document.IsKeyWordChanged){
        //    document.IsKeyWordChanged = false;
            //YahooImageSearch(1);
            //YahooVideoSearch(1);
            //YahooWebsearch(3);
            //TopTenYahooSearch();
            //EbayWebsearch(1);
        //}
    };
    
    Spellword = function(){
        oParam = 'Word='+$('txtKeyward').value;
        new Ajax.Request(document.Services+'/Spellword',{
                        method: 'post',
                        parameters: oParam, 
                        onComplete: _SpellWord
                    }
            );
    };
    
    _SpellWord = function(Result){
        $('SpellResult').innerHTML = removeXML(Result);
        return false;
    };
    SearchSpellword = function(oText){
        $('txtKeyward').value = oText; 
        Search();
    };
    
    SafeSearch = function(IsSafe){
         oParam = 'IsSafe='+IsSafe;
         new Ajax.Request(document.Services+'/SafeSearch',{
                        method: 'post',
                        parameters: oParam, 
                        onComplete: _SafeSearch
                    }
            );
    };
    _SafeSearch = function(Result){
        $('SafeSearchResult').innerHTML = removeXML(Result);
        document.ImageKeyword = "";
        document.VideoKeyword = "";
    };
    
    OpenTabSearch = function(TabIndex){
        $('Exception').innerHTML = "";
        document.SearchTab = TabIndex;
        
        switch(document.SearchTab){
            case 1:
                if (document.IsSearched){
                    $('d_WebSearchResult').style.display = "";
                    $('d_ImageSearchResult').style.display = "none";
                    $('d_YourGigiti').style.display = "none";
                    $('d_VideoSearchResult').style.display = "none";
                    $('d_NewsSearchResult').style.display = "none";
                }
                $('t_web').className = "s_webtab";
                $('t_image').className = "imagetab"
                $('t_gigiti').className = "gigititab"
                $('t_video').className = "videotab"
                $('t_news').className = "newstab"
                
                $('CustomDropDown1_txtDropdown').style.display = "";
                $('CustomDropDown1_imgDropdown').style.display = "";
                $('SpellCheck').style.display = "";
                $('SafeSearchResult').style.display = "none";
                
                
                break;
            case 2:
                if (document.IsSearched){
                    $('d_WebSearchResult').style.display = "none";
                    $('d_ImageSearchResult').style.display = "";
                    $('d_YourGigiti').style.display = "none";
                    $('d_VideoSearchResult').style.display = "none";
                    $('d_NewsSearchResult').style.display = "none";
                }
                $('t_web').className = "webtab";
                $('t_image').className = "s_imagetab"
                $('t_gigiti').className = "gigititab"
                $('t_video').className = "videotab"
                $('t_news').className = "newstab"
                $('CustomDropDown1_txtDropdown').style.display = "none";
                $('CustomDropDown1_imgDropdown').style.display = "none";
                $('SpellCheck').style.display = "none";
                $('SafeSearchResult').style.display = "";
                break;
            case 3:
                if (document.IsSearched){
                    $('d_WebSearchResult').style.display = "none";
                    $('d_ImageSearchResult').style.display = "none";
                    $('d_YourGigiti').style.display = "";
                    $('d_VideoSearchResult').style.display = "none";
                    $('d_NewsSearchResult').style.display = "none";
                }
                break;
            case 4:
                if (document.IsSearched){
                    $('d_WebSearchResult').style.display = "none";
                    $('d_ImageSearchResult').style.display = "none";
                    $('d_YourGigiti').style.display = "none";
                    $('d_VideoSearchResult').style.display = "";
                    $('d_NewsSearchResult').style.display = "none";
                }
                $('t_web').className = "webtab";
                $('t_image').className = "imagetab"
                $('t_gigiti').className = "gigititab"
                $('t_video').className = "s_videotab"
                $('t_news').className = "newstab"
                
                $('CustomDropDown1_txtDropdown').style.display = "none";
                $('CustomDropDown1_imgDropdown').style.display = "none";
                $('SpellCheck').style.display = "none";
                $('SafeSearchResult').style.display = "";
                break;
            case 5:
                if (document.IsSearched){
                    $('d_WebSearchResult').style.display = "none";
                    $('d_ImageSearchResult').style.display = "none";
                    $('d_YourGigiti').style.display = "none";
                    $('d_VideoSearchResult').style.display = "none";
                    $('d_NewsSearchResult').style.display = "";
                }
                $('t_web').className = "webtab";
                $('t_image').className = "imagetab"
                $('t_gigiti').className = "gigititab"
                $('t_video').className = "videotab"
                $('t_news').className = "s_newstab"
                
                $('CustomDropDown1_txtDropdown').style.display = "none";
                $('CustomDropDown1_imgDropdown').style.display = "none";
                $('SpellCheck').style.display = "none";
                $('SafeSearchResult').style.display = "none";
                break;
            default:
                if (document.IsSearched){
                    $('d_WebSearchResult').style.display = "";
                    $('d_ImageSearchResult').style.display = "none";
                    $('d_YourGigiti').style.display = "none";
                    $('d_VideoSearchResult').style.display = "none";
                    $('d_NewsSearchResult').style.display = "none";
                }
                $('t_web').className = "s_webtab";
                $('t_image').className = "imagetab"
                $('t_gigiti').className = "gigititab"
                $('t_video').className = "videotab"
                $('t_news').className = "newstab"
                
                $('CustomDropDown1_txtDropdown').style.display = "";
                $('CustomDropDown1_imgDropdown').style.display = "";
                $('SpellCheck').style.display = "";
                $('SafeSearchResult').style.display = "none";
                break;
        }
    };
    CenterdSearchOptionPlace = function(){
        $('d_SearchOptionPlace').style.marginTop = (window.innerHeight)?(window.innerHeight / 2 - 100) + "px": (window.screen.availHeight / 2 - 180)+"px";
    };
    
    searchKeyPress = function(e){
        if(!e) var e = window.event;
       
        if(e.keyCode == 13){
            SearchButton();
            return false;
        }
    };
    SearchButton = function(){
        if($('txtKeyward').value == ''){
            $('Exception').innerHTML = 'Please enter keyword';
        }
        else{
            Search();
        }
    };
    </script>

</head>
<body onload="CenterdSearchOptionPlace();">
    <div id="loader" style="display: none;">
        <img src="../images/loading-spinner.gif" style="margin-top: 200px;" alt="Loadin..."
            title="Loading..." />
    </div>
    <form id="form1" runat="server">
    <img id="background" alt="Background" src="../images/background.gif" style="border-width: 0px;
        width: 99.8%; position: absolute; z-index: 1; height: 90%" />
    <div id="footerdiv2" style="position: absolute; bottom: 1px; text-align: center;
        width: 100%;">
        <uc1:footer ID="footer2" runat="server" />
    </div>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" style="z-index: 2;
        position: absolute;">
        <tr>
            <td style="min-height: 600px;" align="center">
                <div style="z-index: 2;">
                    <div align="center" id="d_SearchOptionPlace" style="margin-top: 100px;">
                        <div>
                            <table cellpadding="0" cellspacing="0" border="0">
                                <tr>
                                    <td class="s_webtab" id="t_web" onclick="document.SearchTab = 1;Search();">
                                    </td>
                                    <td class="imagetab" id="t_image" onclick="document.SearchTab = 2;Search();">
                                    </td>
                                    <td class="gigititab" id="t_gigiti" onclick="OpenTabSearch(3);">
                                    </td>
                                    <td class="videotab" id="t_video" onclick="document.SearchTab = 4;Search();">
                                    </td>
                                    <td class="newstab" id="t_news" onclick="document.SearchTab = 5;Search();">
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="searchlogo">
                            <div style="padding-top: 40px; padding-left: 40px;">
                                <div id="SpellCheck" style="margin-top: -30px; padding-bottom: 10px;">
                                    <div align="left" style="width: 350px;">
                                        <a href="javascript:void(0);" onclick="Spellword();">Check Spelling</a>
                                    </div>
                                    <div align="left" style="width: 350px;" id="SpellResult">
                                        &nbsp;
                                    </div>
                                </div>
                                <div id="SafeSearchResult" align="left" style="margin-top: -30px; padding-bottom: 10px;
                                    display: none; width: 250px;">
                                    <% If Session("SafeSearch") Is Nothing Then%>
                                    SafeSearch is <a href="javascript:void(0);" onclick="SafeSearch(false);">On</a>
                                    <% Else%>
                                    SafeSearch is <a href="javascript:void(0);" onclick="SafeSearch(true);">Off</a>
                                    <% End If%>
                                </div>
                                <div>
                                    <input id="txtKeyward" type="text" class="aspTextBox" />
                                    <uc1:CustomDropDown ID="CustomDropDown1" runat="server" DataXML="~/XML/Menu.xml" />
                                    <img id="btnSearch" src="../images/GigitiButton4.gif" onclick="SearchButton();return false;"
                                        alt="Search" title="Click to search specified keyword" style="cursor: pointer;
                                        margin-top: -3px;" />
                                </div>
                                <div id="Exception" style="width: 350px; color: Red;">
                                </div>
                            </div>
                        </div>
                    </div>

                    <script language="javascript" type="text/javascript">
                        $('txtKeyward').onkeypress = searchKeyPress;
                    </script>

                    <div style="width: 100%; float: left;" align="center">
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="center">
                                    <div id="d_WebSearchResult" style="display: none;">
                                        <asp:Panel ID="TopTen" runat="server" CssClass="aspPanelResult">
                                            <asp:Image ImageUrl="~/images/spacer.gif" Style="height: 35px;" ID="imgLogoSpace"
                                                runat="server" />
                                            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                                <tbody>
                                                    <tr>
                                                        <td width="24" height="24">
                                                            <asp:Image ID="Image2" runat="server" ImageUrl="~/images/blue/topleft_cornor.gif"
                                                                ImageAlign="right" />
                                                        </td>
                                                        <td class="topHeader_blue" align="left">
                                                            Top Ten
                                                        </td>
                                                        <td width="1" style="width: 1px;" class="topHeader_blue">
                                                            <asp:Image ID="Image3" runat="server" ImageUrl="~/images/blue/topright_cornor.gif"
                                                                ImageAlign="right" />
                                                        </td>
                                                        <td class="topBorder_blue">
                                                        </td>
                                                        <td valign="bottom">
                                                            <asp:Image ID="Image4" runat="server" ImageUrl="~/images/blue/topright_bgcornor.gif"
                                                                ImageAlign="right" />
                                                        </td>
                                                    </tr>
                                                    <tr valign="top">
                                                        <td class="leftBorder_blue">
                                                        </td>
                                                        <td bgcolor="#ffffff" colspan="3" height="50">
                                                            <div id="loadertopten" style="display: none;" class="jsonloader" align="center">
                                                                <img src="../images/loading-spinner.gif" style="margin-top: 200px;" alt="Loadin..."
                                                                    title="Loading..." /></div>
                                                            <div id="TopTenResult" class="WebSearchPanel" style="overflow: auto;">
                                                            </div>
                                                        </td>
                                                        <td class="rightBorder_blue">
                                                        </td>
                                                    </tr>
                                                    <tr valign="top">
                                                        <td valign="bottom">
                                                            <asp:Image ID="Image5" runat="server" ImageUrl="~/images/blue/bottomleft_cornor.gif"
                                                                ImageAlign="right" />
                                                        </td>
                                                        <td class="bottomBorder_blue" colspan="3">
                                                        </td>
                                                        <td valign="bottom">
                                                            <asp:Image ID="Image6" runat="server" ImageUrl="~/images/blue/bottomright_cornor.gif"
                                                                ImageAlign="right" />
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </asp:Panel>
                                        <asp:Panel ID="Yahoo" runat="server" CssClass="aspPanelResult">
                                            <asp:Image ImageUrl="~/images/yahoo.gif" Style="height: 20px; margin-top: 10px; margin-bottom: 5px;"
                                                ID="imgLogoGoogle" runat="server" />
                                            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                                <tbody>
                                                    <tr>
                                                        <td width="24" height="24">
                                                            <asp:Image ID="img6" runat="server" ImageUrl="~/images/blue/topleft_cornor.gif" ImageAlign="right" />
                                                        </td>
                                                        <td class="topHeader_blue" align="left">
                                                            Yahoo Results
                                                        </td>
                                                        <td width="1" style="width: 1px;">
                                                            <asp:Image ID="img7" runat="server" ImageUrl="~/images/blue/topright_cornor.gif"
                                                                ImageAlign="right" />
                                                        </td>
                                                        <td class="topBorder_blue">
                                                        </td>
                                                        <td valign="bottom">
                                                            <asp:Image ID="img8" runat="server" ImageUrl="~/images/blue/topright_bgcornor.gif"
                                                                ImageAlign="right" />
                                                        </td>
                                                    </tr>
                                                    <tr valign="top">
                                                        <td class="leftBorder_blue">
                                                        </td>
                                                        <td bgcolor="#ffffff" colspan="3" height="50">
                                                            <div id="loaderyahoo" style="display: none;" class="jsonloader" align="center">
                                                                <img src="../images/loading-spinner.gif" style="margin-top: 200px;" alt="Loadin..."
                                                                    title="Loading..." /></div>
                                                            <div id="YahooWebsearchResult" class="WebSearchPanel">
                                                            </div>
                                                        </td>
                                                        <td class="rightBorder_blue">
                                                        </td>
                                                    </tr>
                                                    <tr valign="top">
                                                        <td valign="bottom">
                                                            <asp:Image ID="img9" runat="server" ImageUrl="~/images/blue/bottomleft_cornor.gif"
                                                                ImageAlign="right" />
                                                        </td>
                                                        <td class="bottomBorder_blue" colspan="3">
                                                        </td>
                                                        <td valign="bottom">
                                                            <asp:Image ID="img10" runat="server" ImageUrl="~/images/blue/bottomright_cornor.gif"
                                                                ImageAlign="right" />
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </asp:Panel>
                                        <asp:Panel ID="Ebay" runat="server" CssClass="aspPanelResult">
                                            <asp:Image ImageUrl="~/images/ebay.gif" ID="Image1" runat="server" />
                                            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                                <tbody>
                                                    <tr>
                                                        <td width="24" height="24">
                                                            <asp:Image ID="Image8" runat="server" ImageUrl="~/images/blue/topleft_cornor.gif"
                                                                ImageAlign="right" />
                                                        </td>
                                                        <td class="topHeader_blue" align="left">
                                                            Ebay Results
                                                        </td>
                                                        <td width="1" style="width: 1px;">
                                                            <asp:Image ID="Image9" runat="server" ImageUrl="~/images/blue/topright_cornor.gif"
                                                                ImageAlign="right" />
                                                        </td>
                                                        <td class="topBorder_blue">
                                                        </td>
                                                        <td valign="bottom">
                                                            <asp:Image ID="Image10" runat="server" ImageUrl="~/images/blue/topright_bgcornor.gif"
                                                                ImageAlign="right" />
                                                        </td>
                                                    </tr>
                                                    <tr valign="top">
                                                        <td class="leftBorder_blue">
                                                        </td>
                                                        <td bgcolor="#ffffff" colspan="3" height="50">
                                                            <div id="loaderebay" style="display: none;" class="jsonloader" align="center">
                                                                <img src="../images/loading-spinner.gif" style="margin-top: 200px;" alt="Loadin..."
                                                                    title="Loading..." /></div>
                                                            <div id="EbayWebsearchResult" class="WebSearchPanel">
                                                            </div>
                                                        </td>
                                                        <td class="rightBorder_blue">
                                                        </td>
                                                    </tr>
                                                    <tr valign="top">
                                                        <td valign="bottom">
                                                            <asp:Image ID="Image11" runat="server" ImageUrl="~/images/blue/bottomleft_cornor.gif"
                                                                ImageAlign="right" />
                                                        </td>
                                                        <td class="bottomBorder_blue" colspan="3">
                                                        </td>
                                                        <td valign="bottom">
                                                            <asp:Image ID="Image12" runat="server" ImageUrl="~/images/blue/bottomright_cornor.gif"
                                                                ImageAlign="right" />
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </asp:Panel>
                                    </div>
                                    <div id="d_ImageSearchResult" class="ImageSearchResultPanel" align="center" style="display: none;">
                                    </div>
                                    <div id="d_VideoSearchResult" class="VideoSearchResultPanel" align="center" style="display: none;">
                                    </div>
                                    <div id="d_NewsSearchResult" style="display: none;">
                                    </div>
                                </td>
                            </tr>
                        </table>
                        <div id="d_YourGigiti" style="display: none;">
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td align="center" height="50">
                <div id="footerdiv1" style="text-align: center; width: 100%; display: none;">
                    <uc1:footer ID="footer1" runat="server" />
                </div>
            </td>
        </tr>
    </table>
    <div id="div_RecentNews" class="fly-out" align="left" style="display: none;margin-top:50px;">
        <asp:GridView ID="newsRes" AutoGenerateColumns="False" BorderWidth="0" AllowPaging="False"
            PagerStyle-Mode="NextPrev" HorizontalAlign="Center" runat="server" Width="98%"
            GridLines="None">
            <HeaderStyle HorizontalAlign="Center" />
            <Columns>
                <asp:TemplateField HeaderText="Recent News" ItemStyle-Width="100%">
                    <ItemTemplate>
                        -<asp:HyperLink ID="HyperLink2" runat="server" Target="_blank" NavigateUrl='<%#Eval("Url")%>'
                            ToolTip='<%#Eval("Summary")%>' Text='<%#Eval("title")%>' Style="line-height: 13px;"></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <br />
        <div align="center">
            <asp:HyperLink NavigateUrl="~/News/Default.aspx?Q=World" ID="HyperLink1" runat="server">World</asp:HyperLink>
            &nbsp;<asp:HyperLink NavigateUrl="~/News/Default.aspx?Q=Finance" ID="HyperLink2"
                runat="server">Finance</asp:HyperLink>
            &nbsp;<asp:HyperLink NavigateUrl="~/News/Default.aspx?Q=entertainment" ID="HyperLink3"
                runat="server" Style="color: #ffffff;">Entertainment</asp:HyperLink>
            &nbsp;<asp:HyperLink NavigateUrl="~/News/Default.aspx?Q=sports" ID="HyperLink4" runat="server">Sports</asp:HyperLink>
        </div>
    </div>
    </form>
</body>

<script language="javascript" type="text/javascript">
var myGlobalHandlers = {
	    onCreate: function(){
		    Element.show('loader');
	    },

	    onComplete: function() {
		    if(Ajax.activeRequestCount == 0){
			    Element.hide('loader');
		    }
	    }
    };

    Ajax.Responders.register(myGlobalHandlers);
    
    //$('t_news').title = "cssbody=[dvbdy] cssheader=[dvhdr] body=["+$("div_RecentNews").innerHTML+"] hideselects=[on]";
    ShowTooltip = function(e){
        if(!e) var e = window.event;
            var oBj = e.target?e.target:e.srcElement;
         
        $('div_RecentNews').style.display = "";
        $('div_RecentNews').style.top = $('d_SearchOptionPlace').style.marginTop;
        $('div_RecentNews').style.left =  $('t_news').offsetLeft - 100 + "px";
    };
    HideTooltip = function(e){
        $('div_RecentNews').style.display = "none";
        CloseMenu(e);
    };
    $('t_news').onmouseover = ShowTooltip;
    $('div_RecentNews').onmouseover = ShowTooltip;
    //$('div_RecentNews').onmouseout = HideTooltip;
    document.onclick = HideTooltip;
</script>

</html>
